package com.tianji.promotion.service;

import com.tianji.common.domain.dto.PageDTO;
import com.tianji.promotion.domain.po.Coupon;
import com.tianji.promotion.domain.po.ExchangeCode;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tianji.promotion.domain.query.CodeQuery;
import com.tianji.promotion.domain.vo.ExchangeCodeVo;

/**
 * <p>
 * 兑换码 服务类
 * </p>
 *
 * @author LYQ
 * @since 2024-07-03
 */
public interface IExchangeCodeService extends IService<ExchangeCode> {

    /**
     * 调用线程池异步生成优惠券兑换码
     *
     * @param coupon
     */
    void asyncGenerateCode(Coupon coupon);
    /**
     * 优惠券兑换码分页查询
     */
    PageDTO<ExchangeCodeVo> queryExchangeCodePage(CodeQuery query);
    /**
     * 对应序列号的兑换码是否兑换
     */
    boolean updateExchangeMark(long serialNum, boolean b);
}
